<template>
	<view class="content">
		<u-sticky>
			<view class="ui_head">
				<view class="ui_head_time">
					<view class="ui_head_time_str" @click="show = true">2025-04-24</view>
					<view class="ui_head_time_to">至</view>
					<view class="ui_head_time_str" @click="show = true">2025-04-24</view>
				</view>
				<u-tabs :list="tabs" @click="click" lineWidth="20" lineColor="#9F6F26" :scrollable="false"></u-tabs>
			</view>
		</u-sticky>
		<view class="ui_empty"></view>
		<view class="ui_list">
			<view class="ui_list_item">
				<view class="ui_list_item_text">微信小店-橱窗收入</view>
				<view class="ui_list_item_time">2025-05-10 12:45:56</view>
				<view class="ui_list_item_money s">-200.00</view>
			</view>
			<view class="ui_list_item" v-for="(item,index) in 4" :key="index">
				<view class="ui_list_item_text">微信小店-橱窗收入</view>
				<view class="ui_list_item_time">2025-05-10 12:45:56</view>
				<view class="ui_list_item_money">+200.00</view>
			</view>
		</view>

		<u-datetime-picker :show="show" v-model="value1" mode="date" 
		@cancel="show = false" @confirm="confirm" />
	</view>
</template>

<script>
	export default {
		data() {
			return {
				show: false,
				value1: Number(new Date()),
				tabs: [{
					name: '全部',
				}, {
					name: '支出',
				}, {
					name: '收入',
				}]
			}
		},
		methods: {
			click(item) {
				console.log('item', item);
			},
			confirm(e){
				console.log(e)
				this.show = false
			}
		}
	}
</script>

<style lang="less">
	page {
		background-color: #fff;
	}

	.content {
		width: 750rpx;
		position: relative;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;

		.ui_head {
			width: 750rpx;
			display: flex;
			flex-direction: column;
			background: #fff;

			&_time {
				margin-left: 20rpx;
				width: 710rpx;
				height: 74rpx;
				background: #F5F5F5;
				border-radius: 37rpx;
				display: flex;
				align-items: center;
				font-family: PingFang SC;
				font-weight: 500;
				font-size: 28rpx;
				color: #94969D;

				&_str {
					flex: 1;
					line-height: 50rpx;
					text-align: center;
				}
			}
		}

		.ui_empty {
			width: 750rpx;
			height: 20rpx;
			background-color: #F5F5F5;
		}

		.ui_list {
			width: 690rpx;
			padding: 0 30rpx;
			background-color: #fff;

			&_item {
				height: 140rpx;
				border-bottom: 1rpx solid #E6E6E6;
				display: flex;
				flex-direction: column;
				position: relative;

				&_text {
					margin-top: 30rpx;
					font-family: PingFang SC;
					font-weight: bold;
					font-size: 28rpx;
					color: #3E3A39;
					line-height: 48rpx;
				}

				&_time {
					margin-top: 10rpx;
					font-family: PingFang SC;
					font-weight: 500;
					font-size: 24rpx;
					color: #999999;
					line-height: 48rpx;
				}

				&_money {
					position: absolute;
					top: 50rpx;
					right: 0;
					font-family: D-DIN Condensed;
					font-weight: bold;
					font-size: 44rpx;
					color: #333333;
					line-height: 48rpx;
				}

				.s {
					color: #9F6F26;
				}
			}
		}
	}
</style>